package ch9;

/**
 * @author oldliu
 * @since 1.0
 */
public class ArrayEq {
    public static void main(String[] args) {
        int a[] = {1, 2, 3, 4, 6};
        int b[] = {1, 2, 3, 4, 7};
        if (a.length == b.length) {
            for (int c = 0; c < a.length; c++) {
                if (a[c] == b[c]) {
                    if (c == a.length - 1) {
                        System.out.println("数组相同");
                        return;
                    }
                } else {
                    System.out.println("数组不同");
                    break;
                }
            }
        }else{
            System.out.println("不同");
        }

    }
}
